xen: credit2: improve distribution of budget (for domains with caps)
authorDario Faggioli <dario.faggioli@citrix.com>
Tue, 26 Sep 2017 09:48:47 +0000 (10:48 +0100)
committerGeorge Dunlap <george.dunlap@citrix.com>
Tue, 26 Sep 2017 09:48:47 +0000 (10:48 +0100)
commitb23dadae37db3ac68327e0fe9577613030d49724
tree12403fcfef2252ab92de684a39ede884bd300799
parent688170248634810f436745d774aadf2471668969
xen: credit2: improve distribution of budget (for domains with caps)

Instead of letting the vCPU that for first tries to get
some budget take it all (although temporarily), allow each
vCPU to only get a specific quota of the total budget.

This improves fairness, allows for more parallelism, and
prevents vCPUs from not being able to get any budget (e.g.,
because some other vCPU always comes before and gets it all)
for one or more period, and hence starve (and cause troubles
in guest kernels, such as livelocks, triggering of whatchdogs,
etc.).

Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
Reviewed-by: George Dunlap <george.dunlap@eu.citrix.com>
xen/common/sched_credit2.c